﻿using System;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace Tanis.Settings
{
    public partial class SettingsPage : PhoneApplicationPage
    {
        public SettingsPage()
        {
            InitializeComponent();
            _settingsControl.LanguageChanged += _settingsControl_LanguageChanged;
        }

        void _settingsControl_LanguageChanged(object sender, EventArgs e)
        {
            ApplicationBarIconButton button = ApplicationBar.Buttons[0] as ApplicationBarIconButton;
            button.Text = Localization.LocalizedStringsRes.TutorialDoneButtonLabel;
        }

        private void DoneButton_Click(object sender, EventArgs e)
        {
            if (this.NavigationService.CanGoBack)
            {
                this.NavigationService.GoBack();
            }
        }
    }
}